<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"><HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<META NAME="GENERATOR" CONTENT="Adobe FrameMaker 7.0/HTML Export Filter">
<LINK REL="STYLESHEET" HREF="KDM_1.0_9_corepkg.css" CHARSET="ISO-8859-1" TYPE="text/css">
<TITLE> 9	  Core Package</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">
<DIV>
<H6 CLASS="Heading">
<A NAME="pgfId-998826"></A>  <A NAME="58728"></A>Core Package</H6>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1086553"></A>Overview</H3>
<P CLASS="Body">
<A NAME="pgfId-1088276"></A>The Core package provides basic constructs for creating and describing meta-model classes in all specific KDM packages. Classes of the Core package determine the structure of KDM models, define fundamental modeling constraints and determine the reflective API to KDM instances.</P>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1088277"></A>Organization of the Core Package</H3>
<P CLASS="Body">
<A NAME="pgfId-1086705"></A>The KDM uses packages to control complexity and bring together logically interrelated classes. The Core package define a set of meta-model elements which have the purpose of defining the fundamental patterns and constraints implemented by all other KDM packages.</P>
<P CLASS="Body">
<A NAME="pgfId-1086706"></A>The KDM Core packages consists of the following 4 class diagrams:</P>
<UL>
<LI CLASS="Bullet1">
<A NAME="pgfId-1086707"></A>CoreEntities</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1086708"></A>CoreRelations</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1086709"></A>AggregatedRelations </LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1086710"></A>Datatypes </LI>
</UL>
<P CLASS="Body">
<A NAME="pgfId-1086714"></A>The Core package depends on no other packages.</P>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1086716"></A>CoreEntities Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1086717"></A>The CoreEntity class diagram defines key abstractions shared by all KDM models.</P>
<P CLASS="Body">
<A NAME="pgfId-1086719"></A>The classes and associations of the CoreEntities class diagram are shown in <A HREF="KDM_1.0_9_corepkg.htm#29395" CLASS="XRef">See - CoreEntities Class Diagram.</A>. </P>
<P CLASS="Body">
<A NAME="pgfId-1086695"></A>&nbsp;</P>
<P CLASS="Body">
<A NAME="pgfId-1086696"></A>&nbsp;</P>
<P CLASS="Body">
<A NAME="pgfId-1085507"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_9_corepkg-1.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption1">
<A NAME="pgfId-1086566"></A><A NAME="29395"></A>- CoreEntities Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1086773"></A>Element Class (abstract)</H4>
<P CLASS="Body">
<A NAME="pgfId-1086774"></A>An element is an atomic constituent of a model. In the meta-model, an Element is the top meta-element in the KDM class hierarchy. Element is an abstract meta-model element.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1086819"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1088668"></A>Element is the common parent from all meta-model elements of KDM. Most subclasses of Element can own   annotations and user-defined attributes through mechanisms defined in the kdm package.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1088666"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1086820"></A>ModelElement Class (abstract)</H4>
<P CLASS="Body">
<A NAME="pgfId-1086821"></A>A model element is an element that represents some aspect of the existing system.</P>
<P CLASS="Body">
<A NAME="pgfId-1086780"></A>In the meta-model, a ModelElement is the base for all meta-elements of KDM. All other meta-elements are either direct or indirect subclasses of ModelElement. ModelElement is an abstract meta-model element.</P>
<P CLASS="Body">
<A NAME="pgfId-1086781"></A>A ModelElement can be extended through the lightweight extension mechanism.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1086783"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1086784"></A>Element</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1086786"></A>Semantics</H6>
<P CLASS="Body">
<A NAME="pgfId-1088673"></A>The ModelElement is a common class for all meta-model elements that represent some element of the existing software system. The subclasses of Element that are not the subclasses of the ModelElement class are the auxiliary elements of the KDM infrastructure.</P>
<P CLASS="Body">
<A NAME="pgfId-1086787"></A>Each subclass of the ModelElement meta-model element can be extended through the light-weight extension mechanism defined in the kdm package.</P>
<P CLASS="Body">
<A NAME="pgfId-1088677"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1086789"></A>KDMEntity Class (abstract)</H4>
<P CLASS="Body">
<A NAME="pgfId-1086790"></A>A KDM entity is a named model element that represents an artifact of existing software system.</P>
<P CLASS="Body">
<A NAME="pgfId-1086791"></A>In the meta-model, KDMEntity is a subclass of ModelElement. Each KDM package defines specific KDM entities that are direct or indirect subclasses of KDMEntity. A KDMEntity can be either an atomic element, a container for some KDMEntities or a group of some KDMEntities.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1086793"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1086794"></A>ModelElement</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1086851"></A>Attributes</H6>
<P CLASS="Body">
<A NAME="pgfId-1086857"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1086854"></A>name: String </H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1086856"></A>An identifier for the KDM entity.</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1086860"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1086751"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1086867"></A>owner:KDMContainer[0..1]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1086869"></A>KDM container  which owns the current element. This property determines a meta-level interface to KDM entities. This property is a derived union. Every specific KDM container defines a concrete set of owned elements that are subtypes of KDMEntity. In KDM this is represented by the CMOF &quot;derived union&quot; mechanism. Concrete properties subset the &quot;union&quot; properties of the parent classes, defined in the Core package. The owner of a KDM entity is defined as the container for which the given entity is an owned entity.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1086871"></A>group:KDMGroup[0..*]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1086873"></A>Set of KDM groups with which the current element is associated. This property determines a meta-level interface to KDM entities. This property is a derived union. Every specific KDM group defines a concrete set of grouped elements that are the subtypes of KDMEntity. In KDM this is represented by the CMOF &quot;derived union&quot; mechanism. Concrete properties subset the &quot;union&quot; properties of the parent classes, defined in the Core package. The group of a KDM entity is defined as the group for which the given entity is a grouped entity. Each KDM entity can be associated with multiple groups.</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1086893"></A>Constraints</H6>
<OL>
<LI CLASS="List1">
<A NAME="pgfId-1088565"></A>KDMEntity can have either the ownedElement or groupedElement, but not both.</LI>
<LI CLASS="List1-">
<A NAME="pgfId-1088609"></A>KDMEntity should not reference self as groupedElement</LI>
</OL>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1088720"></A>Operations</H6>
<P CLASS="Body">
<A NAME="pgfId-1088730"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1088723"></A>getOwner(): KDMEntity[0..1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1088725"></A>This operation returns the KDM entity which is the owner of the current KDM Entity. The owner entity is a KDM container. There can be at most one owner for each given entity </P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1088727"></A>getOwnerElement():KDMEntity[0..*]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1088729"></A>This operation returns the set of KDM entities which are owned by the current KDM Entity. Only KDM containers can own other entities.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1088748"></A>getGroup():KDMEntity[0..*]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1088750"></A>This operation returns the set of KDM Entities which have a group association to the current KDM Entity. The group entity is a KDM group. Unlike KDM containers, there may be many groups that have an association to a given entity.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1088752"></A>getGroupedElement():KDMEntity[0..*]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1088754"></A>This operation returns the set of KDM entities which are &quot;grouped&quot; by the current KDM entity. Only KDM groups can have group associations to other entities.</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1088718"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1088916"></A>An entity is a thing of significance, about which information needs to be known or held. A KDM entity is an abstraction of some element of an existing software system, that has a distinct, separate existence, a self-contained piece of data that can be referenced as a unit. Each KDM package defines several entity types representing specific abstractions related to a certain viewpoint on existing software systems.</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1086986"></A><A NAME="_Toc131848146"></A>CoreRelations Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1086987"></A>The Core class diagram defines key meta-model associations of KDM models.</P>
<P CLASS="Body">
<A NAME="pgfId-1085555"></A>The classes and associations of the CoreRelations class diagram are shown in <A HREF="KDM_1.0_9_corepkg.htm#48951" CLASS="XRef">See - CoreRelations Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1086298"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_9_corepkg-2.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1086299"></A><A NAME="48951"></A>- CoreRelations Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1087069"></A><A NAME="_Toc131848147"></A>KDMRelationship Class (abstract)</H4>
<P CLASS="Body">
<A NAME="pgfId-1087070"></A>A KDM relationship is a model element that represents semantic association between two entities.</P>
<P CLASS="Body">
<A NAME="pgfId-1087071"></A>In the meta-model, KDMRelationship is a subclass of ModelElement. Each KDM package defines some specific KDM relations that are either direct or indirect subclasses of KDMRelationship. Specific subclasses of KDMRelationship are typed associations between some specific subclasses of KDMEntity.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1087073"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1087074"></A>ModelElement</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1087076"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1087086"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1087079"></A>to: KDMEntity[1] </H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1087081"></A>The target entity (also referred to as the to-endpoint of the relationship). This property determines a meta-level interface to KDM relationships. This property is a derived union. Every specific KDM relationship redefines the to-endpoint to a particular subtype of KDMEntity. In KDM this is represented by the CMOF &quot;redefines&quot; mechanism. Concrete properties redefine the &quot;union&quot; properties of the parent classes, defined in the Core package.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1087083"></A>from:KDMEntity[1] </P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1087085"></A>The origin entity (also referred to as the from-endpoint of the relationship). This property determines a meta-level interface to KDM relationships. This property is a derived union. Every specific KDM relationship redefines the from-endpoint to a particular subtype of KDMEntity. In KDM this is represented by the CMOF &quot;redefines&quot; mechanism. Concrete properties redefine the &quot;union&quot; properties of the parent classes, defined in the Core package.</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1087088"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1088759"></A>Operations</H6>
<P CLASS="Body">
<A NAME="pgfId-1088777"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1088762"></A>getTo(): KDMEntity[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1088764"></A>This operation returns the KDM entity which is the to-endpoint (the target) of the current relationship </P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1088766"></A>getFrom():KDMEntity[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1088768"></A>This operation returns the KDM entity which is the from-endpoint (the origin) of the current relationship.</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1088757"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1088921"></A>A relationship is represents an association, linkage, or connection between entities which describes their interaction, the dependence of one upon the other, or their mutual interdependence. A KDM relationship represents some semantic association between elements of an existing software system. Each KDM package defines several relationship types representing specific abstractions related to a certain viewpoint on existing software systems. All KDM relationships are binary.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1087094"></A><A NAME="_Toc131848148"></A>KDMEntity (additional properties)</H4>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1088416"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1088426"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1088419"></A>ownedRelation: KDMRelationship[0..*]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1088421"></A>Primitive KDM relationships that originate from the current entity</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1088414"></A>Operations</H6>
<P CLASS="Body">
<A NAME="pgfId-1087105"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1087098"></A>getInbound(): KDMRelationship[0..*]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1087100"></A>This operation returns the set of relationships such that the current KDMEntity is the to-endpoint of these relations </P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1087102"></A>getOutbound():KDMRelationship[0..*]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1087104"></A>This operation returns the set of relationships such that the current KDMEntity is the from-endpoint of the these relationships</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1088791"></A>getOwnedRelation():KDMRelationship[0..*]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1088793"></A>This operation returns the set of relationships such that the current KDMEntity owns these relationships</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1087107"></A>Constraints</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1088438"></A>The set of ownedRelations for a given KDMEntity should be the same as the set of KDMRelations for which the from property is the given KDMEntity.</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1088437"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1088967"></A>This property defines the so called &quot;encapsulated relationship&quot; pattern. From the infrastructure perspective, the ownedRelation association is required to manage relationship elements. KDM relationships are owned by the entity which is the origin of the relationship. From the meta-model perspective, each relationship is a self-contained association class with to- and from- properties.</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1087109"></A><A NAME="_Toc131848149"></A>AggregatedRelations Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1087111"></A>The AggregatedRelations class diagram defines the key analysis mechanism of KDM. AggregatedRelationship are part of the &quot;meta-level&quot; interface to KDM models, along with interface defined by KDMEntity, and KDMRelationship. </P>
<P CLASS="Body">
<A NAME="pgfId-1087112"></A>Overall management and lifecycle of the Aggregated Relationships is determined by the operations of the KDMEntity class.</P>
<P CLASS="Body">
<A NAME="pgfId-1088461"></A>The classes and associations of the AggregatedRelations class diagram are shown in <A HREF="KDM_1.0_9_corepkg.htm#66900" CLASS="XRef">See - AggregatedRelations Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1087210"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_9_corepkg-3.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1087211"></A><A NAME="66900"></A>- AggregatedRelations Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1087225"></A><A NAME="_Toc131848150"></A>AggregatedRelationship Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1087226"></A>The set of aggregated relationships for a given entity represents all primitive relationships between the entities that are transitively owned by the given entity as well as the entity itself. This is a concrete class, because an AggregatedRelationship can be instantiated, and exchanged. AggregatedRelations are meant to be built on demand (and exchanged too, if necessary). The lifecycle of the Aggregated Relationships can be explicitly managed by the operations of the KDMEntity class.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1087227"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1087228"></A>ModelElement</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1087230"></A>Attributes</H6>
<P CLASS="Body">
<A NAME="pgfId-1087236"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1087233"></A>density:Integer </H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1087235"></A>The number of primitive relationships in the aggregated set.</P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1087237"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1087238"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1087252"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1087241"></A>relation:KDMRelationship[0..*]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1087243"></A>The set of primitive KDM relationships represented by the aggregated relationship.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1087245"></A>to: KDMEntity[1] </H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1087247"></A>The target container of the relationships in the aggregated set. All relations in the aggregated set should terminate at the target container or at some entity that is contained directly or indirectly in the target container.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1087249"></A>from:KDMEntity[1] </H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1087251"></A>The source container of the relationships in the aggregated set. All relationships in the aggregated set should originate from the source container or from some entity that is contained directly or indirectly in the source container.</P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1087253"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1087267"></A>Constraints</H6>
<OL>
<LI CLASS="List1">
<A NAME="pgfId-1087268"></A>To- and from-endpoints should be distinct.</LI>
<LI CLASS="List1-">
<A NAME="pgfId-1087269"></A>The density should be greater than or equal to 1.</LI>
<LI CLASS="List1-">
<A NAME="pgfId-1087270"></A>The density should be the same as the number of primitive relations represented by the given aggregated relationship.</LI>
<LI CLASS="List1-">
<A NAME="pgfId-1087271"></A>The to- and from- endpoints of each relation should be the same as in the aggregated relationship.</LI>
</OL>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1087273"></A>Semantics</H6>
<P CLASS="Body">
<A NAME="pgfId-1087275"></A>AggregatedRelations are determined by how atomic elements are owned by containers (or referenced by groups) in the following way: </P>
<OL>
<LI CLASS="List1">
<A NAME="pgfId-1087276"></A>AggregatedRelationship between two entities (no owned elements) represents the set of regular KDM relationships between these two entities (such that the first entity is the from-endpoint of the relationship, and the second entity is the to-endpoint of the relationship). </LI>
<LI CLASS="List1-">
<A NAME="pgfId-1087277"></A>AggregatedRelationship between an entity and a container (or group) represents the set of all regular KDM relationships such that the given entity is the from-endpoint and the to-endpoint is any entity that is owned by the given container (directly or indirectly). </LI>
<LI CLASS="List1-">
<A NAME="pgfId-1087278"></A>AggregatedRelationship between a container (or group) and an entity represents the set of all regular relationships such that the to-endpoint is the given entity and the from-endpoint is any entity that is owned by the given container (directly or indirectly).</LI>
<LI CLASS="List1-">
<A NAME="pgfId-1087279"></A>AggregatedRelation between two containers represents the set of all regular KDM relations such that the from-endpoint is an entity owned by the first container and the to-endpoint is an entity owned by the other container.</LI>
</OL>
<P CLASS="Body">
<A NAME="pgfId-1088312"></A>A regular KDM relationship is represented by a subtype of KDMRelationship class. It has a concrete type, and an implied density of 1. An AggregatedRelationship represents a set of regular KDM relationships. It has density of greater or equal than 1 and no concrete type (as it may represent regular KDM relationships of different types). An AggregatedRelationship cannot be constructed between two entities if there are no regular KDM relationships between them (according to the definition above). </P>
<P CLASS="Body">
<A NAME="pgfId-1088628"></A>The relation &quot;x in* C&quot; means that x is in container C or in some sub-container of C, transitively. </P>
<P CLASS="Body">
<A NAME="pgfId-1088629"></A>For relation R, let R' be the corresponding aggregated relation.</P>
<P CLASS="Body">
<A NAME="pgfId-1088630"></A>Given containers C1 and C2 and the relation R, let</P>
<P CLASS="Body">
<A NAME="pgfId-1088631"></A>P = {(x,y) : x in* C1 and y in* C2 and x R y}</P>
<P CLASS="Body">
<A NAME="pgfId-1088632"></A>That is, P is the set of pairs such that x is in* C1 and y is in* C2 and x R y.</P>
<P CLASS="Body">
<A NAME="pgfId-1088633"></A>Then</P>
<P CLASS="Body">
<A NAME="pgfId-1088634"></A>C1 R' C2 iff |P| &gt; 0</P>
<P CLASS="Body">
<A NAME="pgfId-1088635"></A>C1 and C2 are related by the aggregated relation R' if and only if there is at least one pair in the set P.</P>
<P CLASS="Body">
<A NAME="pgfId-1088636"></A>The density of C1 R' C2 is then simply |P|, the size of the set P.</P>
<P CLASS="Body">
<A NAME="pgfId-1088642"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_9_corepkg-4.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1088644"></A><A NAME="46703"></A>- AggregatedRelations illustrated</H6>
<P CLASS="Body">
<A NAME="pgfId-1088648"></A><A HREF="KDM_1.0_9_corepkg.htm#46703" CLASS="XRef">See - AggregatedRelations illustrated.</A> Illustrates Containers and aggregated relations. It uses the following notation. UML package symbols represent KDM Containers, UML associations represent KDMRelations. An arrow at the end of an association indicates, the direction of the relation (there should be at least one arrow; arrows at both ends indicate two relations, one in each direction).Numbers at the ends of associations represent the density of the corresponding KDM relationship. The KDM density has a different interpretation that UML multiplicity: since KDM represents an existing application, the exact relations and their number is what the model captures. KDM model is not a model that represents constraints, like the ones used during the design phase, rather, this is a model that captures precise knowledge about the application. So, the KDM densities are exact.</P>
<P CLASS="Body">
<A NAME="pgfId-1088649"></A>Aggregated relations are collections of more primitive relations, which at the end are some basic code fact, for example &quot;procedure x calls procedure y&quot;. Such basic fact has density 1. The primitive code relation represents some basic fact about the existing application. Now, when there are two or more such facts, for example &quot;procedure x in module A calls procedure y in module B&quot; and &quot;procedure z in module A calls procedure y in module B&quot;, there is an aggregated relation between modules A and B with density 2 (2=1+1). In this case, the aggregated relation represents the collection of the two primitive relations between modules A and B.</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1088800"></A>KDMEntity (additional properties)</H4>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1088837"></A>Operations</H6>
<P CLASS="Body">
<A NAME="pgfId-1088847"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1088840"></A>createAggregation(otherEntity:KDMEntity)</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1088842"></A>This operation creates an aggregated relationship such that the current entity is the from-endpoint of the aggregated relation and the &quot;otherEntity&quot; is the to-endpoint. The new aggregated relationship is owned by the model to which owns the current entity (either directly or indirectly through container ownership).</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1088844"></A>deleteAggregation<BR>
(aggregatedRelation:AggregatedRelationship)</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1088846"></A>This operation deletes the given aggregated relationship.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1088856"></A>getInAggregated():AggregatedRelationship[0..*]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1088858"></A>This operation returns the set of AggregatedRelationship for which the target is the current KDM Entity</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1088860"></A>getOutAggregated():AggregatedRelationship[0..*]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1088862"></A>This operation returns the set of AggregatedRelationship for which the origin is the current KDM Entity</P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1088626"></A>&nbsp;</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1088331"></A><A NAME="_Toc119735812"></A><A NAME="_Toc119728758"></A><A NAME="_Toc131848152"></A>Datatypes Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1087304"></A>The Datatypes class diagram collects together utility data types for the Core package. Each class at the Datatypes class diagram is a subclass of MOF DataType class. The classes of the Datatypes class diagram are shown in <A HREF="KDM_1.0_9_corepkg.htm#25039" CLASS="XRef">See - Datatypes Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1087213"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_9_corepkg-5.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1087214"></A><A NAME="25039"></A>- Datatypes Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1087459"></A><A NAME="_Toc131848154"></A>Boolean Type (datatype)</H4>
<P CLASS="Body">
<A NAME="pgfId-1087460"></A>The meta-model uses the Boolean type to represent some KDM attributes, KDM operations, and their parameters.</P>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1087464"></A><A NAME="_Toc131848155"></A>String Type (datatype)</H4>
<P CLASS="Body">
<A NAME="pgfId-1087465"></A>The meta-model uses the String type to represent some KDM attributes, KDM operations, and their parameters. </P>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1087470"></A><A NAME="_Toc131848156"></A>Integer Type (datatype)</H4>
<P CLASS="Body">
<A NAME="pgfId-1087471"></A>The meta-model uses the Integer type to represent some KDM attributes, KDM operations, and their parameters. </P>
<P CLASS="Body">
<A NAME="pgfId-1082572"></A>&nbsp;</P>
</DIV>
</DIV>
</BODY>
</HTML>
